﻿using System;
using System.Collections.Generic;
using System.Text;
using llAma.Interface;

namespace llAma.Backend.Interface
{
    public interface IBackend : IHandlePackets
    {
        /// <summary>
        /// The server will call this when attempting to authenticate a user
        /// </summary>
        /// <param name="user">Username provided in the login packet</param>
        /// <param name="token">Token (pk) provided in the login packet</param>
        /// <param name="uuid">GUID of the calling connection (For logging purposes)</param>
        /// <returns>An object implementing IUserData on success, or null on failure.</returns>
        /// <remarks>If the user is banned, this function should still return an object implementing IUserData
        /// It is up to the calling class to decide to allow the connection.</remarks>
        IUserData OneWayAuthenticate(string user, string token, Guid uuid);
        /// <summary>
        /// Tells the backend there is a server message that can be logged.
        /// </summary>
        /// <param name="message">A string with a message from the server.</param>
        void LogMessage(string message);
        IChannel LookupChannel(string full_namespace);
        void OnNewConnection(IConnection conn);
        IGpc GpcHandler
        {
            get;
        }
        long TotalClients
        {
            get;
        }
    }
}
